<?php
/* @var $this StrukturOrganisasiController */
/* @var $model StrukturOrganisasi */

$this->breadcrumbs=array(
	'Hak Akses' => array('GroupList')
);
?>

<div id="struktur-organisasi-grid" class="grid-view">
    <div class="x-panel-header-default x-horizontal x-panel-header-horizontal x-panel-header-default-horizontal x-top x-panel-header-top x-panel-header-default-top x-docked-top x-panel-header-docked-top x-panel-header-default-docked-top x-unselectable" style="height:17px;border:0px;">                    
        <span class="x-panel-header-text x-panel-header-text-default"></span>
    </div>
    <div class="ax-body-panel">
        <div class="summary">Total <?php echo count($menu)?> results.</div>
        <div class="btn-right">
            
        </div>
        <table class="items">
            <thead>
                <tr>
                    <th id="struktur-organisasi-grid_c1">
                        <a class="sort-link" href="#">
                            Title
                        </a>
                    </th>
                    <th id="struktur-organisasi-grid_c1">
                        <a class="sort-link" href="#">
                            Url
                        </a>
                    </th>
                    <th id="struktur-organisasi-grid_c1">
                        <a class="sort-link" href="#">
                            Hak Akses
                        </a>
                    </th>
                    
                </tr>
            </thead>
            <tbody>
                <?php
                    foreach($menu as $key=>$value){
                        if($value % 2 == 0){
                            $class = "odd";
                        }else{
                            $class = "even";
                        }
                            
                ?>
                <tr class="<?php echo $class?>">
                    <td><?php echo $value['title']; ?></td>
                    <td><?php echo $value['url']; ?></td>
                    <td style="text-align:center">
                        <?php 
                            if(isset($value['active'])){
                                echo CHtml::link('Aktif', '/MenuGroup/inactive/group_id/'.$group_id.'/menu_id/'.$value['id'], array('style'=>'color:green'));
                            }else
                                echo CHtml::link('Tidak Aktif', '/MenuGroup/active/group_id/'.$group_id.'/menu_id/'.$value['id'], array('style'=>'color:red'));
                        ?>
                    </td>
                    
                </tr>
                <?php
                    }
                ?>
             </tbody>
        </table>
    </div>
    
</div>